package com.lord.base.ws.spring;

import java.util.List;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.lord.model.User;

public class CXFClient {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		ApplicationContext context = new ClassPathXmlApplicationContext("cxf-client.xml");
        IMessageService helloService = (IMessageService) context.getBean("client");
        String response = helloService.getMessage("lord");
        System.out.println(response);
        List<User> list = helloService.findAllUser("find");
        for (User user : list) {
			System.out.println(user);
		}
	}

}
